package com.hx.io.file;

import java.io.File;
import java.util.Date;

/**
 * @author jxlgcmh
 * @create 2019-05-09 13:14
 */
public class FileDemo {
    public static void main(String[] args) {
        File file = new File("a.txt");
        System.out.println(file.getAbsolutePath());
        System.out.println(new Date(file.lastModified()));
        File file2 = new File("D:\\IdeaProjects\\JavaIO");
        String[] list = file2.list();
        for (String s : list) {
            System.out.println(s);
        }
        File[] files = file2.listFiles();
        for (File file1 : files) {
            System.out.println(file1);
        }
    }
}
